Software testing is the process and methodology for improving the quality of software products by trying to minimize the number of defects and their impact in software products. A regular expression is a pattern specification of a regular language, which can be generated by a Type-3 grammar in the Chomsky hierarchy. In software engineering, regular expressions are used for a variety of purposes, such as pattern matching of input strings.
Testing computer programs that use regular expressions may be challenging because it is not always feasible to test every possible use case for the input of the program. In some cases, the number of possibilities is unfeasibly large or even unbounded. Moreover, using regular expressions in computer programs is error prone, as the syntax and complexity of the regular expressions can be challenging to both to the software engineer that creates the regular expression in the first place and the software engineer that maintains the software program and needs to adjust a regular expression. In this regard, it may be difficult to have comprehensive test coverage in situations where software can execute different code depending on matching one or more regular expressions.